local pengpeng = fk.CreateSkill {
  name = "cf_pengpeng",
  tags = { Skill.Compulsory }
}

Fk:loadTranslationTable {
  ["cf_pengpeng"] = "砰砰",
  [":cf_pengpeng"] = "锁定技，1.你每回合前两次造成的伤害改为火属性伤害。2.当一名角色受到火属性伤害时，若该角色为你，防止之；否则该伤害加一。3.当一名角色受到伤害后，若该伤害大于一，则你摸2X-1张牌（X为伤害值）",
  ["$cf_pengpeng1"] = "全都可以炸完！",
  ["$cf_pengpeng2"] = "火力全开！",

}

pengpeng:addEffect(fk.DamageCaused, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(pengpeng.name) and data.from == player and player:usedEffectTimes(self.name) <= 1
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    data.damageType = fk.FireDamage
  end
})

pengpeng:addEffect(fk.DamageInflicted, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(pengpeng.name) and data.damageType == fk.FireDamage
  end,
  on_use = function(self, event, target, player, data)
    if data.to == player then
      data:preventDamage()
    else
      data:changeDamage(1)
    end
  end
})

pengpeng:addEffect(fk.Damaged, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(pengpeng.name) and data.damage > 1
  end,
  on_use = function(self, event, target, player, data)
    player:drawCards(2 * data.damage - 1, pengpeng.name)
  end
})

return pengpeng
